/*
 * Copyright (c) 2022 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import { _init as ZoneOffsetInit } from './ZoneOffset';
import { _init as DayOfWeekInit } from './DayOfWeek';
import { _init as DurationInit } from './Duration';
import { _init as InstantInit } from './Instant';
import { _init as LocalDateInit } from './LocalDate';
import { _init as LocalTimeInit } from './LocalTime';
import { _init as LocalDateTimeInit } from './LocalDateTime';
import { _init as MonthInit } from './Month';
import { _init as MonthDayInit } from './MonthDay';
import { _init as OffsetDateTimeInit } from './OffsetDateTime';
import { _init as OffsetTimeInit } from './OffsetTime';
import { _init as PeriodInit } from './Period';
import { _init as YearInit } from './Year';
import { _init as YearConstantsInit } from './YearConstants';
import { _init as YearMonthInit } from './YearMonth';
import { _init as ZonedDateTimeInit } from './ZonedDateTime';
import { _init as IsoChronologyInit } from './chrono/IsoChronology';
import { _init as DateTimeFormatterInit } from './format/DateTimeFormatter';
import { _init as ChronoFieldInit } from './temporal/ChronoField';
import { _init as ChronoUnitInit } from './temporal/ChronoUnit';
import { _init as IsoFieldsInit } from './temporal/IsoFields';
import { _init as DateTimeFormatterBuilderInit } from './format/DateTimeFormatterBuilder';

import { _init as TemporalQueriesInit } from './temporal/TemporalQueriesFactory';
import { _init as ZoneIdInit } from './ZoneIdFactory';

let isInit = false;

function init() {

    if (isInit) {
        return;
    }

    isInit = true;

    YearConstantsInit();
    DurationInit();
    ChronoUnitInit();
    ChronoFieldInit();
    LocalTimeInit();
    IsoFieldsInit();
    TemporalQueriesInit();
    DayOfWeekInit();
    InstantInit();
    LocalDateInit();
    LocalDateTimeInit();
    YearInit();
    MonthInit();
    YearMonthInit();
    MonthDayInit();
    PeriodInit();
    ZoneOffsetInit();
    ZonedDateTimeInit();
    ZoneIdInit();
    IsoChronologyInit();
    DateTimeFormatterInit();
    DateTimeFormatterBuilderInit();
    OffsetDateTimeInit();
    OffsetTimeInit();
}

init();
